Skip to main content

LuxBot

LuxBot is a practical Discord bot allowing users to display charts, get news, and even perform backtests by using simple slash commands. Commands can be accessed by typing / on a supported channel. Commands have the following form:

/command_name parameter1 parameter2 ...

Commands can have one or multiple parameters that determines the command final output, parameters are given a value by the user. Some parameters are optionals and generally posses a predefined value, this is specified when typing the command.

info

On this page optional parameters are denoted using the * character before the parameter name.

/command_name not_optional *optional

help

/help command

the /help command allows getting information regarding specific commands in the bot, e.g:

/help ha

backtesting

Backtesting commands allows backtesting various built-in strategies using a specific symbol and timeframe. The backtest is performed using the most recent 1000 bars and assumes no frictional costs.

The returned results include various metrics such: number of trades executed, final equity, equity peak, maximum drawdown, win rate, worst trade, and profit factor.

A new long position automatically closes a previous short position, while a new short position automatically closes a previous long position.

Supported timeframes includes: '1min', '5min', '15min', '30min', '45min', '1h', '2h', '4h', '8h', and '1day'. The backtest command covers a wide range of stocks, forex pairs, indices, and cryptocurencies.

info

Exchanges for stocks and cryptocurrencies can be specified by adding it after the ticker while separated by a semicolon (all-caps), for example: BTC/USD:BITFINEX. Not all exchanges are supported.

Information about each strategy can be found below.

backtesting_macross

The macross strategy is a simple moving average crossover strategy, users can define the type of moving averages alongside their periods, the macross syntax is defined as follows:

/backtesting_macross symbol timeframe fastma_type fastma_period slowma_type slowma_period

e.g:

/backtesting_macross GOOG 15min SMA 14 SMA 28

The strategy opens a long position when the fast moving average crossover the slow one, and a short position when the fast moving average cross under the slow one.

Available moving average types include:

Full NameSyntax
Simple Moving AverageSMA
Exponential Moving AverageEMA
Weighted Moving AverageWMA
Double Exponential Moving AverageDEMA
Triple Exponential Moving AverageTEMA
Triangular Moving AverageTRIMA
T3T3
Kaufman Adaptive Moving AverageKAMA

backtesting_supertrend

The supertrend strategy is a strategy based on the Supertrend indicator, the supertrend syntax is defined as follows:

/backtesting_supertrend symbol timeframe factor period

e.g:

/backtesting_supertrend GOOG 15min supertrend 4 7

The strategy opens a long position when the price crossover the supertrend, and a short position when the price cross under the supertrend.

backtesting_macd

The macd strategy is a strategy based on the MACD indicator, the macd syntax is defined as follows:

/backtesting_macd fast_period slow_period hist_period

e.g:

/backtesting_macd GOOG 15min 50 14 9

The strategy opens a long position when the MACD histogram crossover 0, and a short position when the histogram cross under 0.

backtesting_sar

The sar strategy is a strategy based on the SAR indicator, the sar syntax is defined as follows:

/backtesting_sar symbol timeframe acceleration maximum

e.g:

/backtesting_sar GOOG 15min sar 0.02 0.02

The strategy opens a long position when the price crossover the SAR, and a short position when the price cross under the SAR.

backtesting_rsi

The rsi strategy is a strategy based on the RSI indicator, the rsi syntax is defined as follows:

/backtesting_rsi length upper lower

e.g:

/backtesting_rsi GOOG 15min 14 80 20

The strategy opens a long position when the RSI cross under the lower level, and a short position when the RSI cross over the upper level.

backtesting_stochastic

The stochastic strategy is a strategy based on the Stochastic indicator, the stochastic syntax is defined as follows:

/backtesting_stochastic symbol timeframe fastk slowk slowd

e.g:

/backtesting_stochastic GOOG 15min 50 20 7

The strategy opens a long position when the Stochastic slow K crossover the Stochastic Slow D, and a short position when the Stochastic slow K cross under the Stochastic Slow D.

backtesting_turtle

The turtle strategy is a strategy based on the Donchian Channel indicator, the turtle syntax is defined as follows:

/backtesting_turtle symbol timeframe length

e.g:

/backtesting_turtle GOOG 15min 14

The strategy opens a long position when the high price is equal to the upper extremity of the Donchian Channel, and a short position when the low price is equal to the lower extremity of the Donchian Channel

backtesting_momentum

The momentum strategy is a strategy based on the Momentum indicator, the momentum syntax is defined as follows:

/backtesting_momentum symbol timeframe length

e.g:

/backtesting_ GOOG 15min momentum 14

The strategy opens a long position when the momentum oscillator crossover 0, and a short position when the momentum oscillator cross under 0.

backtesting_bbands

The bbands strategy is a strategy based on the Bollinger Bands indicator, the bbands syntax is defined as follows:

/backtesting_bbands symbol timeframe length mult

e.g:

/backtesting_bbands GOOG 15min 20 2

The strategy opens a long position when the price crossover the upper extremity of the Bollinger Bands, and a short position when the price cross under the lower extremity of the Bollinger Bands.

book

/book quote base

Returns the image of a Coinbase order book depth chart of a specific cryptocurrency.

/book btc usd

chart

/chart symbol timeframe *indicators

The /chart command allows getting the image of a tradingview chart of the requested symbol and timeframe.

The user can optionally request indicators to be displayed, e.g:

/chart BTCUSD 15 MACD RSI BB

The above command would display a Bitcoin chart using the 15min timeframe with the MACD, RSI, and BB indicators. The name of the indicators are not case sensitive, you can see the list of supported indicators and their command syntax below:

Full NameName For The Command
Accumulation Distributionaccd
Advance Decline Ratioadr
AROONaroon
Average True Rangeatr
Awesome Oscillatorao
Bollinger Bandsbb
Bollinger Bands %B%b
Bollinger Bands Widthbbw
Chaikin Money Flowcmf
Chaikin Oscillatorchaikin
Chande Momentumcmo
ChoppinessIndexci
Commodity Channel Indexcci
Connors RSIcrsi
Correlation Coefficientcor
Detrended Price Oscillatordpo
Directional Movementdm
Donchian Channelsdon
Double EMAdema
Ease Of Movementeom
Elder's Force Indexefi
Envelopesenv
Fisher Transformfisher
Historical Volatilityhv
Hull Moving Averagehull
Ichimoku Cloudichimoku
Keltner Channelskc
Know Sure Thingkst
Linear Regressionlinreg
Moving Average Convergence Divergencemacd
Momentummom
Money Flowmf
Moon Phasesmoon
Simple Moving Averagesma
Exponential Moving Averageema
Weighted Moving Averagewma
On Balance Volumeobv
Parabolic SARsar
Pivot Points High Lowpivot hl
Pivot Points Standardpivot
Price Oscillatorppo
Price Volume Trendpvt
Rate of Changeroc
Relative Strength Indexrsi
Vigor Indexvigor
Volatility Indexvi
SMI Ergodic Indicatorsmii
SMI Ergodic Oscillatorsmio
Stochastic Oscillatorstoch
Stochastic RSIstochrsi
Triple EMAtema
Trix Oscillatortrix
Ultimate Oscillatoruo
Volatility Stopvstop
VWAPvwap
Volume Weighted Moving Averagevwma
William %R%R

ha

/ha symbol timeframe *indicators

The /ha command works like the /chart command but will return the image of a Heikin-Ashi chart instead of regular candles.

dividends

/dividends symbol

Returns the amount of dividends paid out for the last 10+ years for a specific stock.

earnings

/earnings symbol

Returns data for a given company most recent earnings, including earning date, time (if supplied), estimated earning, actual earning, the difference between the actual and estimated earning, and the surprise (%) of the actual earning related to its estimate.

ipo

/ipo *start

Returns the list of companies with the most recent upcoming IPO in the NASDAQ exchange. Users can optionally select a starting date for the most recent upcoming ipo's, the date should be in the format year-month-day.

news

/news keyword *source

The /news command returns the link of a random recent news related to the requested keyword. A source website can be optionally specified, e.g: /news bitcoin coindesk.

quote

/quote symbol *timeframe

Returns ohlc prices, as well as price change and volume (if available) of the selected symbol over an optional timeframe. If not timeframe are specified, the daily timeframe will be used by default.

sentiment

/sentiment symbol timeframe

Returns the technical analysis sentiment of a given symbol and optional timeframe.